#
# MAINTAINER        Carson,C.J.Zeong <zcy@nicescale.com>
# DOCKER-VERSION    1.6.2
#
# Dockerizing CentOS7: Dockerfile for building CentOS images
#
FROM       centos:centos7.1.1503
MAINTAINER fengjian <fengjian@senyint.com>

ENV TZ "Asia/Shanghai"
ENV TERM xterm

RUN rm /etc/yum.repos.d/* -rf

ADD Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo
ADD 1.repo /etc/yum.repos.d/1.repo
ADD epel-release-latest-7.noarch.rpm /etc/yum.repos.d/epel-release-latest-7.noarch.rpm

RUN rpm -ivh /etc/yum.repos.d/epel-release-latest-7.noarch.rpm

RUN yum install -y curl wget tar bzip2 unzip vim-enhanced passwd sudo yum-utils hostname net-tools rsync man && \
    yum install -y gcc gcc-c++ git make automake cmake patch logrotate python-devel libpng-devel libjpeg-devel && \
    yum install -y python-pip 

#RUN pip install --upgrade pip
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  supervisor
ADD supervisord.conf /etc/supervisord.conf

RUN mkdir -p /etc/supervisor.conf.d && \
    mkdir -p /var/log/supervisor

EXPOSE 22

ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
